﻿using QuanLyBanHang.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data;
using System.Data.SqlClient;
using QuanLyBanHang.DTO;

namespace QuanLyBanHang.DAL
{
    class DangNhapDAL
    {
       
        KetNoiSQL kn = new KetNoiSQL();
       
        SqlCommand cmd;
        public DataTable LayDuLieu(DangNhapcs dn)
        {
            cmd = new SqlCommand();
            cmd.CommandText = "select * From DangNhap where TenDN = @TenDN and MatKhau = @MatKhau";
            cmd.Parameters.Add("@TenDN", SqlDbType.NVarChar, 50).Value =  DangNhapcs.TenDangNhap;
            cmd.Parameters.Add("@MatKhau", SqlDbType.NVarChar, 50).Value = DangNhapcs.MatKhau;

            return kn.LayDuLieu(cmd) ;
        }
        
            
       
    }
}
